import request from '@/utils/request'
import type { APIResponse } from '@/types/api'

// 创建订单的DTO
export interface CreateOrderDto {
  hospitalBranchId: number;
  patientName: string;
  patientIdCard: string;
  applicationReason: string;
  items: OrderItemDto[];
}

export interface OrderItemDto {
  checkItemId: number;
  quantity: number;
}

// 创建订单
export function createOrder(data: CreateOrderDto) {
  return request<APIResponse<any>>({
    url: '/api/OrderRecordCreateOrderRecord',
    method: 'POST',
    data
  })
} 